home *** CD-ROM | disk | FTP | other *** search
/ NCSoft Asset Disc (USA) / NCSoft Asset Disc (USA).bin / kuf.swf / scripts / DefineSprite_82 / frame_1 / DoAction.as
Encoding:
Text File  |  2003-05-03  |  660 b   |  21 lines

  1. mouseListener = new Object();
  2. mouseListener.thisPath = this;
  3. mouseListener.onMouseMove = function()
  4. {
  5.    this.thisPath.scrollingLine = (this.thisPath._y - this.thisPath.firstY) / this.thisPath.scrollRange * 0.5 * this.thisPath._parent.overviewTF.maxscroll;
  6.    this.thisPath._parent.overviewTF.scroll = Math.ceil(this.thisPath.scrollingLine);
  7. };
  8. this.onPress = function()
  9. {
  10.    if(this.readyScroll)
  11.    {
  12.       Mouse.addListener(this.mouseListener);
  13.       this.startDrag(false,this._x,this.firstY,this._x,this.firstY + this.scrollRange * 2);
  14.    }
  15. };
  16. this.onRelease = function()
  17. {
  18.    Mouse.removeListener(this.mouseListener);
  19.    stopDrag();
  20. };
  21.